1. Field of the Invention
The present invention relates to layer 2 and layer 3 switching of data packets in a non-locking network switch configured for switching data packets between subnetworks.
2. Background Art
Local area networks use a network cable or other media to link stations on the network. Each local area network architecture uses a media access control (MAC) enabling network interface devices at each network node to access the network medium.
The Ethernet protocol IEEE 802.3 has evolved to specify a half-duplex media access mechanism and a full-duplex media access mechanism for transmission of data packets. The full-duplex media access mechanism provides a two-way, point-to-point communication link between two network elements, for example between a network node and a switched hub.
Switched local area networks are encountering increasing demands for higher speed connectivity, more flexible switching performance, and the ability to accommodate more complex network architectures. For example, commonly-assigned U.S. Pat. No. 5,953,335 discloses a network switch configured for switching layer 2 type Ethernet (IEEE 802.3) data packets between different network nodes; a received data packet may include a VLAN (virtual LAN) tagged frame according to IEEE 802.1q protocol that specifies another subnetwork (via a router) or a prescribed group of stations. Since the switching occurs at the layer 2 level, a router is typically necessary to transfer the data packet between subnetworks.
Efforts to enhance the switching performance of a network switch to include layer 3 (e.g., Internet protocol) processing may suffer serious drawbacks, as current layer 2 switches preferably are configured for operating in a non-blocking mode, where data packets can be output from the switch at the same rate that the data packets are received. Newer designs are needed to ensure that higher speed switches can provide both layer 2 switching and layer 3 switching capabilities for faster speed networks such as 100 Mbps or gigabit networks.
However, such design requirements risk loss of the non-blocking features of the network switch, as it becomes increasingly difficult for the switching fabric of a network switch to be able to perform layer 3 processing at the wire rates (i.e., the network data rate). Such layer 3 processing may be especially difficult as different layer 3 formats are developed. For example, current layer 3 protocols on the Internet mostly use Internet Protocol version 4 (IPv4); however, networks are beginning to deploy the newer version of Internet Protocol version 6 (IPv6). Hence, attempts to deploy the newer version of IPv6 often requires a complete reconfiguration of the router or the network switch in order to accommodate the newer protocol, often at the expense of substantial processing power if a network administrator needs to support both Ipv4 and IPv6 formats.
There is a need for an arrangement that enables a network switch to provide layer 2 switching and layer 3 switching capabilities for 100 Mbps and gigabit links without blocking of the data packets, regardless of the layer 3 protocol format.
There is also a need for an arrangement that enables a network switch to provide layer 2 switching and layer 3 switching capabilities that can support both Ipv4 and IPv6 formats with minimal modifications.
There is also a need for an arrangement that enables a network switch to be easily programmable to distinguish between different types of layer 3 data packets so that quality of service (QoS) can be achieved.
These and other needs are attained by the present invention, where a network switch port includes a filter configured for evaluating an incoming data packet on an instantaneous basis. The filter performs simultaneous comparisons between the incoming data stream of the data packet and multiple templates configured for identifying respective attributes of the data packet. Each template is composed of at least one branch term having a plurality of min terms, where each min term specifies a prescribed comparison operation with a selected data byte of the incoming data packet. Each branch term specifies a corresponding independent determination of whether the incoming data stream matches the template. The filter accesses the min terms based on the ordering of the data bytes, such that the min terms that are used to compare the first data byte are first accessed for comparison with the first data byte as the first data byte is received; the min terms used to compare the second data byte are then accessed for comparison with the second data byte as the second data byte is received. Hence, the filter simultaneously compares the min terms that correspond to the selected byte of the incoming data packet as the selected byte is received by the network switch port. The results of the comparisons between the min terms and the selected data bytes of the incoming data stream are evaluated by an equation core within the filter, which determines comparison results for each branch term of the templates and outputs a tag to the switching core specifying whether the incoming data steam has the corresponding attribute, providing the switching core with information on how to process the received data packet. Hence, the switching core has sufficient time to perform layer 2 or layer 3 switching of the received data packet in a non-blocking manner in a high-speed data network. Moreover, each branch term can be configured to identify the same attribute according to a corresponding data protocol, for example a corresponding Internet Protocol version. Hence, the network switch port can simultaneously support multiple data protocols, merely by the addition of respective branch terms.
One aspect of the present invention provides a method of evaluating an incoming data packet at a network switch port. The method includes storing a plurality of equations configured for identifying respective data attributes of the incoming data packet, each equation having at least first and second branches for determining whether the incoming data packet has the corresponding data attribute according to first and second data protocol formats, respectively, each branch including at least one min term configured for comparing a corresponding prescribed value to a corresponding selected byte of the incoming data packet. The method also includes independently evaluating the incoming data packet with the branches by simultaneously comparing, to the selected byte, the min terms that correspond to the selected byte as the selected byte is received by the network switch port. A comparison result is then generated that identifies the data attribute of incoming data packet independent of whether the data packet has one of the first and second data protocol formats, based on the comparisons of the min terms to the data bytes received by the network switch port. The storage of equations configured for identifying respective data attributes enables the network switch port to be easily programmable to identify user-defined data attributes. Moreover, the branches for identifying the attribute for a corresponding equation based on respective data protocol formats enables the incoming data packet to be evaluated for the presence of the prescribed attributes in real time, independent of whether those attributes are implemented in different data protocol formats, for example Ipv4 or IPv6. Hence, the network switch port can easily support multiple data protocol formats with little or no modification to the existing network switch programming.
Another aspect of the present invention provides a method of evaluating an incoming data packet at a network switch port. The method includes simultaneously comparing a first byte of the incoming data packet as the first byte is received by the network switch port, with a plurality of equations configured for identifying respective attributes of the incoming data packet, each equation having at least first and second branches configured for determining whether the incoming data packet has the corresponding data attribute according to first and second data protocol formats, respectively, by comparing the first byte with at least a first min term associated with at least one of the branches. The method also includes simultaneously comparing a second byte of the incoming data packet, following the first byte, with the branches of the equations by comparing the second byte with at least a second min term associated with at least one of the branches. A comparison result is then generated based on min term results from the comparisons of the first byte and the second byte relative to the plurality of equations.
Still another aspect of the present invention provides a network switch port filter configured for evaluating an incoming data packet. The network switch port filter includes a min term memory configured for storing at least first and second min term values, each min term value stored based on a location of a corresponding selected byte of the incoming data packet for comparison, an expression portion specifying a corresponding comparison operation, and a branch identifier field that specifies branches that use the corresponding min term, the first and second min term values each configured for identifying a corresponding data protocol format for a corresponding branch. The network switch port filter also includes a min term generator configured for simultaneously comparing a received byte of the incoming data packet with the min terms that correspond to the received byte and generating respective min term comparison results. The network switch port filter also includes an equation core configured for generating a frame tag identifying an attribute of the incoming data packet, independent of a data protocol format of the incoming data frame, based on the min term comparison results relative to the branches.
Additional advantages and novel features of the invention will be set forth in part in the description which follows and in part will become apparent to those skilled in the art upon examination of the following or may be learned by practice of the invention. The advantages of the present invention may be realized and attained by means of instrumentalities and combinations particularly pointed in the appended claims.